﻿using ParkSaleForAdmin.Data;
using ParkSaleForAdmin.Foundation;

namespace ParkSaleForAdmin.FunctionWindow
{
    class OwnHouse : BasicManagerWindow<OwnHouseInfo>
    {
        public override string TableName => "ownedHouse";

        public override string DeleteStr(OwnHouseInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", obj.id);
        }

        public override string AppendStr(OwnHouseInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", "999999");
        }

        public override string ChangeStr(OwnHouseInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", obj.id);
        }
    }

    class OwnHouseInfo
    {
        [DataToUI("房产编号", false)]
        public string id
        {
            get;
            set;
        }
        [DataToUI("所在小区")]
        public string location
        {
            get;
            set;
        }
        [DataToUI("房产归属者")]
        public string owner
        {
            get;
            set;
        }
        [DataToUI("楼号")]
        public string house
        {
            get;
            set;
        }
        [DataToUI("门牌号")]
        public string number
        {
            get;
            set;
        }
    }
}
